import { inject, observer } from 'mobx-react'
import { makeObservable } from 'mobx'
import React, { Component } from 'react'
import { Text, View } from 'react-native'
@inject("RootStore")
@observer
export default class Btn extends Component {
    constructor() {
        super()
        makeObservable(this,{})
    }
    handleChange = () => {
        this.props.RootStore.changeName('八戒');
        console.log('aaa', this.props);
    }
    render() {
        console.log(this.props.RootStore.name)
        return (
            <View>
                <Text onPress={this.handleChange}> 我是btn组件 {this.props.RootStore.name} </Text>
            </View>
        )
    }
}
